home *** CD-ROM | disk | FTP | other *** search
- ///////////////////////////////////////////////////////////////
- //
- // Module : QBTXTMAC.PRG
- //
- // Created by SUMMER'93 (c) on Fri Nov 26 14:50:46 1993
- //
- ///////////////////////////////////////////////////////////////
- #include "snj.ch"
- // This procedure named after its module
- procedure QBTXTMAC( FNAME )
- // Calls: ATNEXT
- // Called By: INVOUT
- // Q B T X T M A C
- // Procedure to read a text file each line of which is
- // a series of macros to define how info should be printed
- // uses clipper file reading facilities and
- // Tom Rettig function atnext()
-
- // The following locals have been declared by Summer'93
- // X A Y
- local BUFFER, OCC, OPOS, NPOS, MACLINE, X, A, Y
-
- X := replicate( "A", 1 )
- A := "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
- X := substr( A, 1, 1 )
- Y := chr( 32 )
- BUFFER := memoread( FNAME )
- OCC := OPOS := NPOS := 1
- set print on
- do while .t.
- NPOS := ATNEXT( chr(13 ), BUFFER, OCC )
- if NPOS = 0
- exit
- endif
- MACLINE := substr( BUFFER, OPOS, NPOS - OPOS )
-
- if substr( MACLINE, 1, 1 )<> "*"
- ?&MACLINE
- endif
- OPOS := NPOS + 2
- OCC := OCC + 1
- enddo
- set print off
- // eject
- return
- // End of file
-